/**
 * @description: stop() destroy()方法都已标记为过时
 * 执行命令你会发现线程还在执行，并没有中断
 * @author: 杨亚旭 89121757@qq.com
 * @create: 2019-03-12 18:23
 **/
public class InterruptedThread extends Thread{

    public void run(){
        //判断线程的状态是否中断
        while( Thread.currentThread().isInterrupted() ){
            System.out.println("====");
        }
    }

    public static void main(String[] args) throws InterruptedException {
        InterruptedThread thread=new InterruptedThread();
        thread.start();
        thread.interrupt();
    }

}
